#ifndef __CCUSTOM_STATIC_CONTROL_H__
#define __CCUSTOM_STATIC_CONTROL_H__

#include <gdiplus.h>
using namespace Gdiplus;

class CCustomStatic : public CStatic
{
	DECLARE_DYNAMIC(CCustomStatic)

//*************************************************************************************************//Class Function
public:
	CCustomStatic(void);
	~CCustomStatic(void);

	//Commom Setting
	void Initialize(HWND hPParentWnd, HWND hParentWnd, HDC hBgDC, HDC hDrawDC, int nParentx = 0, int nParenty = 0);

	//String or Font Setting
	void SetWindowTextW(LPCTSTR lpszString);
	void SetFontSize(int nSize);
	void SetFontStyle(UINT nStyle);
	void SetFontColor(int nR, int nG, int nB);
	void SetFontFamily(CString strFontFamilyName);
	
	//UI Drawing
	void DrawUI();
	BOOL ShowWindow(int nCmdShow);

private:
	void CreateFont();
	

//*************************************************************************************************//Class Parameters
private:
	//String and Font Parameter
	CString m_strText;
	int m_nFontSize, m_nFontStyle;
	Gdiplus::Unit m_enFontUnit;
	Gdiplus::StringFormat* m_strTextFormat;
	Gdiplus::FontFamily* m_pFontFamily;
	Gdiplus::SolidBrush* m_pFontBrush;
	Gdiplus::Font* m_pFont;

	//UI Rect Parameter
	CRect m_rtRect, m_rtPRect, m_rtPPRect;
	
	//Image and Handle Parameter
	Image* m_pImg[4];
	HDC m_hBgDC, m_hDrawDC;
	HWND m_hPParentWnd, m_hParentWnd;
//*************************************************************************************************//Class Message
public:
	virtual void PreSubclassWindow();
	virtual void DrawItem(LPDRAWITEMSTRUCT /*lpDrawItemStruct*/);
	DECLARE_MESSAGE_MAP()
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
protected:
	
};
#endif

